<?php

class Controller {
    protected $prefix;
    
    protected function __construct($prefix){
        $this->prefix = $prefix;
    }
    
    public function save($key, $value){
        $_SESSION[$this->prefix][$key] = $value;
    }
    
    public function load($key){
        return $_SESSION[$this->prefix][$key];
    }
    
    public function view($view){
        include_once 'views/header.view.phtml';
        include_once 'views/' . $this->prefix . '/' . $view . '.view.phtml';
        include_once 'views/footer.view.phtml';
    }
    
}

?>
